/**
 * FileName: RestoreController
 * Author:   秋水浮萍
 * Date:     2020/8/29 19:29
 * Description: 基本信息的恢复
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.demo.controller;

import com.demo.model.JsonMessage;
import com.demo.service.RestoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 〈一句话功能简述〉<br>
 * 〈基本信息的恢复〉
 *
 * @author 秋水浮萍
 * @create 2020/8/29
 * @since 1.0.0
 */
@RestController
@Api(value = "标的基本信息的恢复接口")
@RequestMapping("/bus/restore")
public class RestoreController {

    @Autowired
    private RestoreService service;

    //债权基本信息 恢复
    @ApiOperation(value = "债权基本信息 恢复")
    @PostMapping("restoreClaims")
    public JsonMessage restoreClaims(String claimsNumber) {
        JsonMessage message = new JsonMessage();
        service.restoreClaims(claimsNumber);
        message.setData("已恢复");
        return message;
    }

    //借款合同 恢复
    @ApiOperation(value = "借款合同 恢复")
    @PostMapping("restoreBorrow")
    public JsonMessage restoreBorrow(String borrowId) {
        JsonMessage message = new JsonMessage();
        service.restoreBorrow(borrowId);
        message.setData("已恢复");
        return message;
    }

    //保证合同 恢复
    @ApiOperation(value = "保证合同 恢复")
    @PostMapping("restoreGuarantor")
    public JsonMessage restoreGuarantor(String guarantorId) {
        JsonMessage message = new JsonMessage();
        service.restoreGuarantor(guarantorId);
        message.setData("已恢复");
        return message;
    }

    //抵质押合同 恢复
    @ApiOperation(value = "抵质押合同 恢复")
    @PostMapping("restoreContract")
    public JsonMessage restoreContract(String contractId) {
        JsonMessage message = new JsonMessage();
        service.restoreContract(contractId);
        message.setData("已恢复");
        return message;
    }

    //抵质押物基本信息 恢复
    @ApiOperation(value = "抵质押物基本信息 恢复")
    @PostMapping("restoreCollateral")
    public JsonMessage restoreCollateral(String collateralId) {
        JsonMessage message = new JsonMessage();
        service.restoreCollateral(collateralId);
        message.setData("已恢复");
        return message;
    }

    //亮点 恢复
    @ApiOperation(value = "亮点 恢复")
    @PostMapping("restoreLight")
    public JsonMessage restoreLight(String lightId) {
        JsonMessage message = new JsonMessage();
        service.restoreLight(lightId);
        message.setData("已恢复");
        return message;
    }

    //房产 恢复
    @ApiOperation(value = "房产 恢复")
    @PostMapping("restoreProperty")
    public JsonMessage restoreProperty(String propertyId) {
        JsonMessage message = new JsonMessage();
        service.restoreProperty(propertyId);
        message.setData("已恢复");
        return message;
    }

    //土地 恢复
    @ApiOperation(value = "土地 恢复")
    @PostMapping("restoreLand")
    public JsonMessage restoreLand(String landId) {
        JsonMessage message = new JsonMessage();
        service.restoreLand(landId);
        message.setData("已恢复");
        return message;
    }

    //其他 恢复
    @ApiOperation(value = "其他 恢复")
    @PostMapping("restoreOther")
    public JsonMessage restoreOther(String otherId) {
        JsonMessage message = new JsonMessage();
        service.restoreOther(otherId);
        message.setData("已恢复");
        return message;
    }

    //包 恢复
    @ApiOperation(value = "包 恢复")
    @PostMapping("restorePackage")
    public JsonMessage restorePackage(String packageId){
        JsonMessage message=new JsonMessage();
        service.restorePackage(packageId);
        message.setData("已恢复");
        return message;
    }
}